<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改钉钉运行任务')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-task-edit" th:object="${sysDingRuTask}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">版本号：</label>
                <div class="col-sm-8">
                    <input name="rev" th:field="*{rev}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">流程实例id：</label>
                <div class="col-sm-8">
                    <input name="procInstId" th:field="*{procInstId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">钉钉流程code：</label>
                <div class="col-sm-8">
                    <input name="procCode" th:field="*{procCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">活动id：</label>
                <div class="col-sm-8">
                    <input name="activityId" th:field="*{activityId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">任务名称：</label>
                <div class="col-sm-8">
                    <input name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">父任务id：</label>
                <div class="col-sm-8">
                    <input name="parentTaskId" th:field="*{parentTaskId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">描述：</label>
                <div class="col-sm-8">
                    <textarea name="description" class="form-control">[[*{description}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">任务定义key：</label>
                <div class="col-sm-8">
                    <input name="taskDefKey" th:field="*{taskDefKey}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">待办人：</label>
                <div class="col-sm-8">
                    <input name="assignee" th:field="*{assignee}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">结束时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="finishTime" th:value="${#dates.format(sysDingRuTask.finishTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">任务状态：</label>
                <div class="col-sm-8">
                    <input name="taskState" th:field="*{taskState}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">分类：</label>
                <div class="col-sm-8">
                    <input name="category" th:field="*{category}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">任务挂起状态：</label>
                <div class="col-sm-8">
                    <input name="suspensionState" th:field="*{suspensionState}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">租户id：</label>
                <div class="col-sm-8">
                    <input name="tenantId" th:field="*{tenantId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">外部表单key：</label>
                <div class="col-sm-8">
                    <input name="formKey" th:field="*{formKey}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/task";
        $("#form-task-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-task-edit').serialize());
            }
        }

        $("input[name='finishTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>